// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC

@use "ds/_sizes.scss" as *;
@use "ds/_borders.scss" as *;
@use "ds/typography.scss" as *;
@use "ds/spacing.scss" as *;
@use "ds/z-index.scss" as *;

.toast {
  --toast-icon-color: var(--color-foreground-secondary);
  --toast-vertical-index: var(--z-index-notifications);
  --toast-inset-block-start-position: var(--sp-l);
  --toast-inset-inline-end-position: var(--sp-l);

  min-inline-size: $sz-224;
  max-inline-size: $sz-480;

  display: block;
  position: fixed;
  inset-block-start: var(--toast-inset-block-start-position);
  inset-inline-end: var(--toast-inset-inline-end-position);
  z-index: var(--toast-vertical-index);
}

.level-default {
  --toast-icon-color: var(--color-icon-default);
}

.level-info {
  --toast-icon-color: var(--color-accent-info);
}

.level-error {
  --toast-icon-color: var(--color-accent-error);
}

.level-warning {
  --toast-icon-color: var(--color-accent-warning);
}

.level-success {
  --toast-icon-color: var(--color-accent-success);
}

.close-button {
  appearance: none;
  width: $sz-16;
  height: $sz-16;
  position: absolute;
  top: var(--sp-l);
  right: var(--sp-l);
  background: none;
  border: none;
  color: var(--toast-icon-color);
}
